The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
child = gtk_widget_get_prev_sibling (child);
else
{
- GtkWidget *indent = gtk_builtin_icon_new ("indent");
+ GtkWidget *indent =
+ g_object_new (GTK_TYPE_BUILTIN_ICON,
+ "css-name", "indent",
+ "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION,
+ NULL);
gtk_widget_insert_after (indent, GTK_WIDGET (self), NULL);
-
- /* The indent icon is not visible in the accessibility tree */
- gtk_accessible_update_state (GTK_ACCESSIBLE (indent),
- GTK_ACCESSIBLE_STATE_HIDDEN, TRUE,
- -1);
}
}